<template>
	<div class="categorylist">
	    <xjsearch></xjsearch>
		<div style="position:fixed;bottom:50px;width:100%;display:flex;justify-content:center;">雪鲸教育</div>
		<xjmenubar :menubar="tabbar" :prevent="false" :cactive="cactive"></xjmenubar>
	</div>
</template>

<script>
    import xjsearch from '@/components/shop/xjsearch.vue';
	import xjmenubar from '@/components/shop/xjmenubar.vue';
	export default {
		components: {
			xjsearch,
			xjmenubar
		},
		data() {
			return {
				tabbar: "", //菜单数据
				cactive: 0, //菜单索引
			}
		},
		methods: {
			async getPhonePageData() {
				let res = await this.$frontaxios.post(this.$front.getPhonePageData);
				//console.log(res);
				if (!res.data) {
					this.$notify({ type: 'warning', message:'请设置店铺首页，再过来查看' });
					return;
				}
				if (res.code == 1) {
					this.tabbar = res.data.tabbar;
				} else {
					this.$notify({ type: 'warning', message:res.msg});
				}
			}
		},
		created() {
			this.getPhonePageData(); //获得菜单栏数据初始化菜单数据
		}
	}
</script>

<style lang="scss" scoped>
	.categorylist {
		.van-card__content {
			margin-left: 20px;
		}

		.van-cell {
			align-items: center;
			border: 1px solid #eee;
			height: 40px;
		}
	}

	.child-item {
		margin-top: 10px;
		text-align: center;

		.vancol {
			margin-bottom: 8px;

			.defaulttagcolor {
				color: #87929B;
			}

			.selecttagcolor {
				color: #168DFA;
			}
		}
	}
</style>
